package com.heima.wemedia.fegin;

import com.heima.apis.wemedia.IWeMediaClient;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.wemedia.service.WmChannelService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Slf4j

public class WeMediaClient implements IWeMediaClient {
    @Autowired
    private WmChannelService wmChannelService;
    @GetMapping("/api/v1/channel/list")
    public  ResponseResult getChannels(){
        return  wmChannelService.findChannelALl();
    }
}
